home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / C++ AppleLink Messages / CPlus.Dev$ 1⁄19⁄90 / 0043-Re C++ and the "asm"-Jan90 < prev    next >
Encoding:
Text File  |  1990-01-19  |  1.2 KB  |  30 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  LEFFLER1     to RODSETH.R
  2.  
  3. Item forwarded  by  ALCABES      to CPLUS.APPLE$
  4.  
  5. Item    4022261                         18-Jan-90        13:38
  6.  
  7. From:   GARDNER.P                       Gardner, Preston
  8.  
  9. To:     ALCABES                         Alcabes, Harvey
  10.         CPLUS.DEV$                      C++ Interest List--Developers
  11.         D0578                           Shiva,PRT
  12.  
  13. Sub:    Re: C++ and the "asm" keyword
  14.  
  15. There are actually two answers to your question.  One has been given already by
  16. Peter Marx (D4682):  asm is not supported by MPW C++ because it's not supported
  17. by MPW C.  What the compiler actually does is treat "asm" as a keyword that is
  18. not a part of the grammar, so that you can't declare a variable called "asm"
  19. but if you use the asm statement it will be a syntax error.
  20.  
  21. The other answer is that your example is wrong; you have to put the assembly
  22. code in double quotes.  Depending on what kind of C you are using, it may or
  23. may not be possible to break a quoted string over several lines.  It is
  24. possible with ANSI C but not with older K&R C compilers.  (I didn't try it with
  25. MPW C to see what it does.  It's kind of irrelevant anyway.)
  26.  
  27.  
  28. I'd say, "Hope this helps," like Peter Marx did, but it probably doesn't help.
  29.  
  30.